#include "SMPPBroadcastEndTime.hpp"

using namespace smpp::pdu;

BroadcastEndTime::BroadcastEndTime(const CoctetString &nValue):
TLV(TLVtags::TAG_BROADCAST_END_TIME,nValue.size()),_Value(nValue){}

BroadcastEndTime::BroadcastEndTime(
const BroadcastEndTime &nBroadcastEndTime):
TLV(nBroadcastEndTime),_Value(nBroadcastEndTime.getValue()){}

bool BroadcastEndTime::operator ==(
	const BroadcastEndTime &nBroadcastEndTime) const{
	return (TLV::operator == (nBroadcastEndTime) && 
		_Value == nBroadcastEndTime.getValue());
}

bool BroadcastEndTime::operator !=(
	const BroadcastEndTime &nBroadcastEndTime) const{
		return !this->operator == (nBroadcastEndTime);
}

BroadcastEndTime &BroadcastEndTime::operator = (
	const BroadcastEndTime &nBroadcastEndTime){
	if(*this == nBroadcastEndTime)
		return *this;
	TLV::operator = (nBroadcastEndTime);
	_Value = nBroadcastEndTime.getValue();
	return *this;
}

void BroadcastEndTime::setValue(const CoctetString &nValue){
	_Value = nValue;
}

const CoctetString &BroadcastEndTime::getValue() const{
	return _Value;
}
